package framework;

/**
 * This is the interface for the client-defined automaton plugin. This stores
 * the initial state of the automata and contains client-defined methods
 * responsible for updating the automaton cell states. This interface must be
 * implemented by the client.
 * 
 */

public interface AutomatonPluginInterface {

	/**
	 * This method returns the current board. Board object is initialized by
	 * client. Note that when initializing the board, the client must initialize
	 * each cell. This includes setting the initial state of each cell using
	 * method setState(state) and the x and y coordinates of position of each
	 * cell using setRowNum(r) and setColNum(c).
	 * 
	 * @return Board board - the board containing all the cells
	 */
	public BoardInterface getBoard();

	/**
	 * Given a cell and its neighbors, this method updates the cell's state by
	 * looking at the states of neighbor cells and following some client-defined
	 * rule. Note that states are implemented as int.
	 * 
	 * @param CellInterface c - a cell that need to be updated
	 * @param int[] NbrStates - the states of the cell's neighbors
	 */
	public void updateCellState(CellInterface c, int[] NbrStates);

	/**
	 * Returns an array of all cell states.
	 * 
	 * @return int[] states - all the possible states of the cells
	 */
	public int[] getAllStates();

}
